﻿using Easy.Services.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Easy.Services.Config
{
    internal class IOSConfig : IEntityTypeConfiguration<IOS>
    {
        public void Configure(EntityTypeBuilder<IOS> builder)
        {
            builder.ToTable(nameof(IOS));

            builder.Property(r => r.CreaterDate);
            builder.Property(r => r.CreaterId).IsRequired(false);
            builder.Property(r => r.CreaterName).HasMaxLength(50).IsRequired(false);
            builder.Property(r => r.EditDate).IsRequired(false);
            builder.Property(r => r.EditId).IsRequired(false);
            builder.Property(r => r.EditName).HasMaxLength(50).IsRequired(false);
            builder.Property(r => r.IsDelete).IsRequired(false);

            builder.Property(r => r.MaxCPU).HasMaxLength(20).IsRequired(false);
            builder.Property(r => r.MinCPU).HasMaxLength(20).IsRequired(false);
            builder.Property(r => r.RAM).HasMaxLength(20).IsRequired(false);
            builder.Property(r => r.Storage).HasMaxLength(20).IsRequired(false);
            builder.Property(r => r.IPAddr).HasMaxLength(100).IsRequired(false);

        }
    }

}
